Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

357
Views
Vue connecting to firebase - uncaught FirebaseError: "projectId" not provided in firebase.initilializeApp

I'm following this twitter clone (using Vue) tutorial, and on about 01:30:00 he connects his app to firebase.

  1. I created firebase DataBase, and copied the firebase parameters.

  2. I entered a dummy document to the Database.

  3. I cloned the GitHub repo for this project, and changed the 'firebase.js' file with the firebase parameters.

This is the firebase.js:

import firebase from "firebase/app"
import "firebase/firestore"

const firebaseConfig = {
  apiKey: "...",
  authDomain: "...",
  projectId: "...",
  storageBucket: "...",
  messagingSenderId: "...",
  appId: "...",
}

firebase.initializeApp(firebaseConfig)

let db = firebase.firestore()

export default db

And I got the following error (in chrome on 'localhost:8080'):

Uncaught FirebaseError: "projectId" not provided in firebase.initializeApp.
    at new n (prebuilt-306f43d8-45d6f0b9.js?fef0:188)
    at eval (prebuilt-306f43d8-45d6f0b9.js?fef0:14819)
    at n.t (prebuilt-306f43d8-45d6f0b9.js?fef0:14821)
    at new n (prebuilt-306f43d8-45d6f0b9.js?fef0:15414)
    at eval (index.js?1c42:69)
    at Component.eval [as instanceFactory] (index.js?1c42:66)
    at Provider.getOrInitializeService (index.esm.js?a40d:338)
    at Provider.getImmediate (index.esm.js?a40d:130)
    at FirebaseAppImpl._getService (index.esm.js?8d00:219)
    at FirebaseAppImpl.firebaseAppImpl.<computed> [as firestore] (index.esm.js?8d00:437)
  1. I changed the 'firebase.js' with the example that on the Vue website.

firebase.js:

// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
import { initializeApp } from "firebase/app";

const firebaseConfig = {
  apiKey: "...",
  authDomain: "...",
  projectId: "...",
  storageBucket: "...",
  messagingSenderId: "...",
  appId: "...",
  measurementId: "..."
};

// Initialize Firebase
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);

But I still get the same error (as on section 3).

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

My guess is that the file firebase.js may not being loaded. You can check it with a

console.log('test')

inside that file.

If it is not loading I would try changing the name form firebase.js to fb.js.

about 4 years ago · Juan Pablo Isaza Report

0

The problem is that the database wasn't named correctly (as demanded in the open source) - I needed to call it Qwitter.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!